import _ from 'lodash'

const state = {
    userInfo: null,
    areaTreeSelectedId: null,
    fields: null,
    asyncQueue: null,
    treeData: null,
    applyState: [],
}
try {
    for (let key in state) {
        _.isNil(localStorage.getItem(key)) || (state[key] = JSON.parse(localStorage.getItem(key)))
    }
} catch (e) {
    console.log(e)
}

export default state
